<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.meichaoit.entity.Account"%>
<%@page import="com.meichaoit.dao.AccountDao"%>

<%

			String money = request.getParameter("money");
			
			Account account = (Account)session.getAttribute("account");
			account.setMoney(account.getMoney() - Float.valueOf(money));
			
			AccountDao dao = new AccountDao();
			int rows = dao.update(account);
			if(rows > 0) {
				response.sendRedirect("main.jsp");
			}
	
%>
